package com.esd.db.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.esd.db.model.worker;

public interface workerMapper {

	int deleteByPrimaryKey(Integer workerId);

	int insert(worker record);

	int insertSelective(worker record);

	worker selectByPrimaryKey(Integer workerId);

	worker selectWorkerByUserId(Integer userid);

	int selectWorkerIdByUserId(Integer userid);

	worker selectWorkerByWorkerPhone(String workerPhone);

	worker selectWorkerByWorkerIdCard(String workerIdCard);

	worker selectWorkerByWorkerDisabilityCard(String workerDisabilityCard);

	int selectCountWorkerIdByUserId(Integer userId);

	int updateByPrimaryKeySelective(worker record);

	int updateByPrimaryKeyWithBLOBs(worker record);

	int updateByPrimaryKey(worker record);

	int updateByUserId(worker worker);
	
	int updateByWgc(worker worker);

	String selectWorkerRealNameByWorkerId(int workerId);

	String selectDownCountByWorkerId(int workerId);

	List<Map<String, Object>> selectLikeRealName(Map<String, Object> map);
	
	List<worker> selectUIdAndWIdByVersionAndWGC (Map<String, Object> map);

	int selectCountLikeRealname(Map<String, Object> map);

	List<Map<String, Object>> selectWorkerLvl(Map<String, Object> map);

	int selectWorkerLvlCount(Map<String, Object> map);

	int selectWorkerCount();
	
	List<worker> selectWorkerIdByUpdateId(int workerId);

	void updateTaskForResetDownload(Map<String, Object> map);

	void deleteWorkerRecordForResetDownload(Map<String, Object> map);

	void updateWorkerForResetDownload(Map<String, Object> map);

	int selectDownloadStatusByWorkerId(int workerId);

	Date selectTaskDownTimeByWorkerId(int workerId);

	int changeAlipayStatusByWorkerId(Map<String, Object> map);

	int insertSelectiveReturnWorkerId(worker worker);

	int updateRealNameByWorkerId(Map<String, Object> map);
	
	/**
	 * 查询所有的工作者id和工作组 组成map key workerId  value workerGroupCode
	 * @return
	 */
	List<Map<String, Object>> selectAllWorkerIdAndGroupCodeMap();
}